package com.linxianqin.springbootVue.domain.convert;


import com.linxianqin.springbootVue.domain.dto.SysMenuDTO;
import com.linxianqin.springbootVue.domain.entity.SysMenu;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;


/**
 * 功能描述：SysMenu转化接口
 * @author lxq
 * @version 1.00
 * @Date 2020/12/13
 */
@Mapper
public interface SysMenuConvert {
    SysMenuConvert INSTANCE = Mappers.getMapper(SysMenuConvert.class);


    @Mappings({
            @Mapping(target = "children", ignore = true),
    })
    SysMenuDTO entity2dto(SysMenu sysMenu);
    List<SysMenuDTO> entity2dto(List<SysMenu> list);
    SysMenu dto2entity(SysMenuDTO sysMenu);
    List<SysMenu> dto2entity(List<SysMenuDTO> list);
}
